//
// Navbars
// --------------------------------------------------

// Customized navbar
//
// Reset inverted navbar basics
@navbar-custom-color:                      #fff;
@navbar-custom-bg:                         #2A6496;
@navbar-custom-border:                     darken(@navbar-custom-bg, 10%);

// Inverted navbar links
@navbar-custom-link-color:                 #eee;
@navbar-custom-link-hover-color:           #fff;
@navbar-custom-link-hover-bg:              transparent;
@navbar-custom-link-active-color:          @navbar-custom-link-hover-color;
@navbar-custom-link-active-bg:             darken(@navbar-custom-bg, 10%);
@navbar-custom-link-disabled-color:        #444;
@navbar-custom-link-disabled-bg:           transparent;

// Inverted navbar brand label
@navbar-custom-brand-color:                @navbar-custom-link-color;
@navbar-custom-brand-hover-color:          #fff;
@navbar-custom-brand-hover-bg:             transparent;

// Inverted navbar toggle
@navbar-custom-toggle-hover-bg:            #333;
@navbar-custom-toggle-icon-bar-bg:         #fff;
@navbar-custom-toggle-border-color:        #333;

// Inverse navbar

.navbar-custom {
  background-color: @navbar-custom-bg;
  border-color: @navbar-custom-border;

  .navbar-brand {
    color: @navbar-custom-brand-color;
    &:hover,
    &:focus {
      color: @navbar-custom-brand-hover-color;
      background-color: @navbar-custom-brand-hover-bg;
    }
  }

  .navbar-text {
    color: @navbar-custom-color;
  }

  .navbar-nav {
    > li > a {
      color: @navbar-custom-link-color;

      &:hover,
      &:focus {
        color: @navbar-custom-link-hover-color;
        background-color: @navbar-custom-link-hover-bg;
      }
    }
    > .active > a {
      &,
      &:hover,
      &:focus {
        color: @navbar-custom-link-active-color;
        background-color: @navbar-custom-link-active-bg;
      }
    }
    > .disabled > a {
      &,
      &:hover,
      &:focus {
        color: @navbar-custom-link-disabled-color;
        background-color: @navbar-custom-link-disabled-bg;
      }
    }
  }

  // Darken the responsive nav toggle
  .navbar-toggle {
    border-color: @navbar-custom-toggle-border-color;
    &:hover,
    &:focus {
      background-color: @navbar-custom-toggle-hover-bg;
    }
    .icon-bar {
      background-color: @navbar-custom-toggle-icon-bar-bg;
    }
  }

  .navbar-collapse,
  .navbar-form {
    border-color: darken(@navbar-custom-bg, 7%);
  }

  // Dropdowns
  .navbar-nav {
    > .open > a {
      &,
      &:hover,
      &:focus {
        background-color: @navbar-custom-link-active-bg;
        color: @navbar-custom-link-active-color;
      }
    }

    @media (max-width: @grid-float-breakpoint-max) {
      // Dropdowns get custom display
      .open .dropdown-menu {
        > .dropdown-header {
          border-color: @navbar-custom-border;
        }
        .divider {
          background-color: @navbar-custom-border;
        }
        > li > a {
          color: @navbar-custom-link-color;
          &:hover,
          &:focus {
            color: @navbar-custom-link-hover-color;
            background-color: @navbar-custom-link-hover-bg;
          }
        }
        > .active > a {
          &,
          &:hover,
          &:focus {
            color: @navbar-custom-link-active-color;
            background-color: @navbar-custom-link-active-bg;
          }
        }
        > .disabled > a {
          &,
          &:hover,
          &:focus {
            color: @navbar-custom-link-disabled-color;
            background-color: @navbar-custom-link-disabled-bg;
          }
        }
      }
    }
  }

  .navbar-link {
    color: @navbar-custom-link-color;
    &:hover {
      color: @navbar-custom-link-hover-color;
    }
  }

}
